package com.yc.hotel.user.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.yc.hotel.dto.UserInfoDTO;

@FeignClient(name="user-server", fallback = IUserInfoFeignClient.UserInfoFeignClientFallBack.class)
public interface IUserInfoFeignClient {
	
	@GetMapping("users/findByUno")
	UserInfoDTO findByUno(@RequestParam int uno);
	
	@Component
	public static class UserInfoFeignClientFallBack implements IUserInfoFeignClient {

		@Override
		public UserInfoDTO findByUno(int uno) {
			// TODO Auto-generated method stub
			return null;
		}
		
	}
}
